﻿@model Sys_UserEidtModel
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN VALIDATION STATES-->
        <div class="portlet box green">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-reorder"></i>@ViewBag.TableTitle
                </div>
                <div class="tools">
                </div>
            </div>
            <div class="portlet-body form">
                <!-- BEGIN FORM-->
                @using (Html.BeginForm("Edit", null, null, FormMethod.Post, new
                {
                    @class = "form-horizontal",
                    @novalidate = "novalidate",
                    @enctype = "multipart/form-data"
                }))
                {
                    <div class="form-body">
                        @Html.AntiForgeryToken()
                        @Html.Partial("_Tip")
                        @Html.HiddenFor(s => s.Id)

                        <div class="form-group">
                            <label class="control-label col-md-3">
                                登錄Id
                                <span class="required">
                                    *
                                </span>
                            </label>
                            <div class="col-md-4">
                                <input type="text" name="LoginName" data-required="1" class="form-control" value="@(Model?.LoginName)">
                            </div>
                        </div>
                        @if ((Model?.Id).GetValueOrDefault() <= 0)
                        {
                            <div class="form-group">
                                <label class="control-label col-md-3">
                                    登錄密碼
                                    <span class="required">
                                        *
                                    </span>
                                </label>
                                <div class="col-md-4">
                                    <input name="LoginPwd" type="password" data-required="1" class="form-control" value="">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-md-3">
                                    登錄密碼
                                    <span class="required">
                                        *
                                    </span>
                                </label>
                                <div class="col-md-4">
                                    <input name="LoginPwd2" type="password" data-required="1" class="form-control" value="@(Model?.LoginPwd)">
                                </div>
                            </div>
                        }
                        <div class="form-group">
                            <label class="control-label col-md-3">用戶名</label>
                            <div class="col-md-4">
                                <input name="Name" type="text" class="form-control" value="@(Model?.Name)">
                            </div>
                        </div>

                    </div>

                    <div class="form-actions fluid">
                        <div class="col-md-offset-3 col-md-9">
                            <button type="submit" class="btn green">Submit</button>
                            <button type="button" class="btn default">Cancel</button>
                        </div>
                    </div>
                }
                <!-- END FORM-->
            </div>
            <!-- END VALIDATION STATES-->
        </div>
    </div>
</div>

@section script{
    <script src="~/assets/zrjs/user/edit.js"></script>
    <script>
        $(function () {
            FormValidation.init();
            FormComponents.init();
        })
    </script>
}